<html  xmlns:th="http://www.thymeleaf.org"
       xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1"/>
    <meta charset="utf-8"/>
    <title>米塔云平台管理系统</title>
    <link href="../plugins/bootstrap/bootstrap.min.css" rel="stylesheet">
    <link href="../plugins/bootstrapValidator/bootstrapValidator.min.css" rel="stylesheet">
    <link href="../plugins/font-awesome/css/all.min.css" rel="stylesheet">
    <link href="../customize/css/iconfont.css" rel="stylesheet">
    <link href="../customize/css/content.css" rel="stylesheet">
</head>
<body>
<div class="m-3">
    <div class="custom-section">
        <nav class="mb-3">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><i class="iconfont icon-xiaolan6"></i> 设备管理</li>
                <li class="breadcrumb-item active"><i class="iconfont icon-xiaolan1"></i> 采集设备病例</li>
            </ol>
        </nav>

        <div shiro:hasAnyPermissions="device:proc:maintenance:view,device:proc:maintenance:opera" class="d-flex align-items-center justify-content-between">
            <form class="form-row align-items-center" id="param_form">
                <div class="col-auto">
                    <strong class="font-p14">条件查询：</strong>
                </div>
                <div class="col-auto">
                    <input class="form-control time-picker" name="beginTime" id="searchTimeBegin" type="text"
                           placeholder="开始时间" autocomplete="off">
                </div>
                <div class="col-auto">
                    <input class="form-control time-picker" name="endTime" id="searchTimeEnd" type="text"
                           placeholder="结束时间" autocomplete="off">
                    <input type="hidden" name="type" value="0">
                </div>
                <div class="col-auto">
                    <button class="btn btn-primary" type="button" onclick="loadMaintenanceData()"><i
                            class="iconfont icon-dituyechaxun"></i> 查询
                    </button>
                </div>
            </form>
            <div>
                <button shiro:hasPermission="device:sensor:maintenance:opera" class="btn btn-primary" type="button" onclick="addInfo()"><i class="fa fa-plus"></i> 添加设备病例
                </button>
            </div>
        </div>
        <table class="table table-striped table-bordered table-center" id="maintenance_List">
            <thead>
            <tr>
                <th>#</th>
                <th>采集设备名称</th>
                <th>采集设备编号</th>
                <th>维护内容</th>
                <th>维护时间</th>
                <th shiro:hasPermission="device:sensor:maintenance:opera">操作</th>
            </tr>
            </thead>
            <tbody>

            </tbody>
        </table>
        <div id="page" class="page_div"></div>
    </div>
</div>
<!-- Modal -->
<div  shiro:hasPermission="device:sensor:maintenance:opera" class="modal fade" id="addInfoModal" data-backdrop="static" tabindex="-1">
    <div class="modal-dialog modal-dialog-centered">
        <form class="modal-content text-body" id="addInfoForm">
            <div class="modal-header">
                <div class="modal-title"><i class="iconfont icon-juxing"></i><span id="modal_title">添加设备病例</span></div>
                <button type="button" class="close" data-dismiss="modal">
                    <span>&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="text-secondary font-p12 mb-2">注：带<span class="form-required">*</span><span class="ml-3"></span>标识的为必填项</div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="validationCustom01">采集设备编号<span class="form-required">*</span></label>
                    <div class="col-sm-8">
                        <input type="hidden" name="id" id="id-id">
                        <input type="hidden" name="methodType" id="method-id" value="0">
                        <input class="form-control" type="text" name="sn" id="validationCustom01">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="validationCustom03">维护时间<span class="form-required">*</span></label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="maintenanceTime" id="validationCustom03" autocomplete="off">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label" for="validationCustom02">维护内容<span class="form-required">*</span></label>
                    <div class="col-sm-8">

                        <textarea class="form-control" name="content" id="validationCustom02" row="3"></textarea>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="submit" class="btn btn-primary">提交保存</button>
            </div>
        </form>
    </div>
</div>
<script src="../plugins/jquery-3.4.1.min.js"></script>
<script src="../plugins/bootstrap/bootstrap.bundle.min.js"></script>
<script src="../plugins/bootstrapValidator/bootstrapValidator.min.js"></script>
<script src="../plugins/bootstrapValidator/zh_CN.js"></script>
<script src="../plugins/alert.js"></script>
<script src="../plugins/paging.js"></script>
<script src="../plugins/laydate/laydate.js"></script>
<script src="../customize/js/common.js"></script>
<script src="../customize/js/CommonUtils.js"></script>
<script src="../customize/js/customModalV2.js"></script>
<script src="../customize/js/acqEquMaintenance.js"></script>
<script>
    var deviceSensorMaintenanceView =false;
    var deviceSensorMaintenancePera =false;
    var title = ['#', '采集设备名称', '采集设备编号', '维护内容', '维护时间'];
    var label = ['order', 'name', 'sn', 'content', 'maintenanceTime'];
</script>
<shiro:hasPermission name="device:sensor:maintenance:view">
    <script>
        deviceSensorMaintenanceView =true;
    </script>
</shiro:hasPermission>
<shiro:hasPermission name="device:sensor:maintenance:opera">
    <script>
        deviceSensorMaintenancePera =true;
        title.push('操作');
        label.push('opera');
    </script>
</shiro:hasPermission>
</body>
</html>